package org.credo.thread.Condition;

/**
 *存钱的线程操作.
 */
public class SaveMoneyThread implements Runnable{

	@Override
	public void run() {
		for(int i=0;i<15;i++){
			account.saveMoney(saveMoney);
		}
	}

	private Account account;
	private double saveMoney;
	
	public SaveMoneyThread(Account account,double saveMoney){
		this.account=account;
		this.saveMoney=saveMoney;
	}

	public Account getAccount() {
		return account;
	}
	public void setAccount(Account account) {
		this.account = account;
	}
	
	public double getSaveMoney() {
		return saveMoney;
	}
	
	public void setSaveMoney(double saveMoney) {
		this.saveMoney = saveMoney;
	}
}
